#ifndef GAME_MANAGER_H
#define GAME_MANAGER_H

#include "cg/cg.h"
#include "Menu.h"
#include "CameraManager.h"
#include "MainCamera.h"
#include "ThirdPersonCamera.h"
#include "FreeCamera.h"
#include "MyPeanut.h"
#include "MyWorld.h"
#include "HeightMap.h"
#include "MyWood.h"
#include "MyRock.h"
#include "Lightning.h"
#include "Scene.h"
#include "Skybox.h"
#include "Enemy1.h"
#include "Sugar.h"
#include "Enemy2.h"
#include "Oil.h"
#include "CollisionManager.h"
#include "CollectableManager.h"
#include "Enemy1Manager.h"
#include "Enemy2Manager.h"
#include "ShooterManager.h"
#include "MyHUD.h"
#include "TreeManager.h"

namespace PeanutQuest {

	class GameManager : public cg::Entity,
		public cg::IUpdateListener,
		public cg::IDrawListener {

			static const int MENU = 0;
			static const int LEVEL1 = 1;
			static const int LEVEL2 = 2;

			int actualLevel;

	public:

		MyPhysics _physics;
		MyPeanut* _peanut;
		ShooterManager* _sm;
		MyHUD* _hud;
		Enemy1Manager* _e1m;
		Enemy2Manager* _e2m;
		CollectableManager* _cm;

		cg::View *v;
		GameManager();
		~GameManager();

		void init();
		void update(unsigned long elapsed_millis);

		int getLevel();

		void disableEntities();
		void LoadMainEntities();
		void UnLoadMainEntities();

		void LoadGameMenu();
		void LoadLevel1();
		void LoadLevel2();

		void UnLoadLevel0();

		void resetLevel1();
		void resetLevel2();
	};
}

#endif